package com.jiukuaidao.zhulin.data;

import com.jiukuaidao.library.net.IApi;

/**
 * Author : BinarySatan
 * Date : 2016/5/20
 * Description :
 */
public class TasksRepository implements TaskDataSource {


    private TasksRepository() {
    }

    static class INSTANCE {
        static TasksRepository instance = new TasksRepository();
    }

    public static TasksRepository getInstance() {
        return INSTANCE.instance;
    }


    @Override
    public void loadData(IApi api) {
        loadData(api, true);
    }

    @Override
    public void loadData(IApi api, boolean isBuildParams) {
        loadData(api, isBuildParams, false);
    }

    @Override
    public void loadData(IApi api, boolean isBuildParams, boolean aes) {
        if (isBuildParams)
            api.buildBaseParams();

        if (aes)
            api.aes();

        api.start();

    }
}
